package com.yx.china.project.controller;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: TestController
 * @Description: TODO
 * @Author: SongFuShuang
 * @Date: 2020/4/23 21:31
 * @Version: v1.0
 *  
 */
@RestController
@RefreshScope   //SpringCloud原生注解 支持Nacos的动态刷新功能
public class TestController {

    @Value("${config.info}")
    private String configInfo;

    @GetMapping("/config/info")
    public String getConfigInfo(){
        return configInfo;
    }
}
